package org.jsbd.boss.domian;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

import edu.hziee.common.lang.DateUtil;

/**
 * 破解单机的信息类
 * 
 * @author Administrator
 * 
 */
public class DoRegsInfo implements Serializable {
	private static final long serialVersionUID = -1901190210006949537L;
	private String imsi; //
	private String imei; //
	private String pid; // 登录指令
	private String cpid; // 支付代码
	private String chid; // 支付代码
	private String cid; // 支付代码
	private String resultCode; // 支付代码
	private String resultMessage; // 错误信息
	private String userToken;
	private String sdkSessionId;
	private String version;
	private String random;
	private String currentDate;
	private String yesterday;
	private int type;// 用于记录是第几次发送的日志从1开始
	private String model;

	// 新增字段
	private String brand;
	private String uuid;
	private String macAddr;
	private String screen;
	private String packageName;
	private String appName;
	private String versionName;
	private String versionCode;
	private int loginType; // 记录刷卡类型1表示的是不需要IMis号的刷留存，默认为0

	public String getImsi() {
		return imsi;
	}

	public void setImsi(String imsi) {
		this.imsi = imsi;
	}

	public String getImei() {
		return imei;
	}

	public void setImei(String imei) {
		this.imei = imei;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getCpid() {
		return cpid;
	}

	public void setCpid(String cpid) {
		this.cpid = cpid;
	}

	public String getResultCode() {
		return resultCode;
	}

	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}

	public String getResultMessage() {
		return resultMessage;
	}

	public void setResultMessage(String resultMessage) {
		this.resultMessage = resultMessage;
	}

	public String getChid() {
		return chid;
	}

	public void setChid(String chid) {
		this.chid = chid;
	}

	public String getCid() {
		return cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	public String getCurrentDate() {
		if (currentDate == null) {
			currentDate = DateUtil.formatDate(new Date(), "yyyyMMdd");
			setCurrentDate(currentDate);
		}
		return currentDate;
	}

	public String getUserToken() {
		return userToken;
	}

	public void setUserToken(String userToken) {
		this.userToken = userToken;
	}

	public void setCurrentDate(String currentDate) {
		this.currentDate = currentDate;
	}

	public String getSdkSessionId() {
		return sdkSessionId;
	}

	public void setSdkSessionId(String sdkSessionId) {
		this.sdkSessionId = sdkSessionId;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getRandom() {
		return random;
	}

	public void setRandom(String random) {
		this.random = random;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getYesterday() {
		if (yesterday == null) {
			Calendar calendar = Calendar.getInstance();
			calendar.add(Calendar.DAY_OF_MONTH, -1);
			yesterday = DateUtil.formatDate(calendar.getTime(), "yyyyMMdd");
			setYesterday(yesterday);
		}
		return yesterday;
	}

	public void setYesterday(String yesterday) {
		this.yesterday = yesterday;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getMacAddr() {
		return macAddr;
	}

	public void setMacAddr(String macAddr) {
		this.macAddr = macAddr;
	}

	public String getScreen() {
		return screen;
	}

	public void setScreen(String screen) {
		this.screen = screen;
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getVersionName() {
		return versionName;
	}

	public void setVersionName(String versionName) {
		this.versionName = versionName;
	}

	public String getVersionCode() {
		return versionCode;
	}

	public void setVersionCode(String versionCode) {
		this.versionCode = versionCode;
	}

	public int getLoginType() {
		return loginType;
	}

	public void setLoginType(int loginType) {
		this.loginType = loginType;
	}
}
